<?php

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');
// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
    'basePath' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..',
    'name' => 'My Web Application',
    // preloading 'log' component
    'preload' => array('log'),
    // autoloading model and component classes
    'import' => array(
        'application.models.*',
        'application.components.*',
    ),
    'modules' => array(
        // uncomment the following to enable the Gii tool
/*
        'gii' => array(
            'class' => 'system.gii.GiiModule',
            'password' => 'zxcvbnm',
            // If removed, Gii defaults to localhost only. Edit carefully to taste.
            'ipFilters' => array('127.0.0.1', '::1'),
        ),
 */
 
    ),
    // application components
    'components' => array(
        'user' => array(
            // enable cookie-based authentication
            'allowAutoLogin' => true,
        ),
        // uncomment the following to enable URLs in path-format
        'urlManager' => array(
            'urlFormat' => 'path',
            'rules' => array(
                'trang-chu' => 'mainpage/index',
                'van-ban-phap-luat' => 'mainpage/Vanbanphapluat',
                'van-ban/<id:[0-9a-zA-Z_-]+>/<url:[0-9a-zA-Z_-]+>' => 'mainpage/NoidungVanbanphapluat',
                'dang-nhap' => 'home/loginweb',
                'luat-su/<id:[0-9a-zA-Z_-]+>/<url:[0-9a-zA-Z_-]+>'=>'mainpage/Doanhnghiep',
                'doan-luat/<id:[0-9a-zA-Z_-]+>/<url:[0-9a-zA-Z_-]+>'=>'mainpage/Timkiem1',
                'danh-ba/<url:[0-9a-zA-Z_-]+>'=>'mainpage/doanluat',
                'tim-luat-su/<id:[0-9a-zA-Z_-]+>'=>'mainpage/Timkiem1',
                'tu-van/<url:[0-9a-zA-Z_-]+>'=>'mainpage/doanluatsu',
                'dich-vu/<url:[0-9a-zA-Z_-]+>'=>'mainpage/doanluatsu',
                'to-tung/<url:[0-9a-zA-Z_-]+>'=>'mainpage/doanluatsu',
                'to-chuc/<url:[0-9a-zA-Z_-]+>'=>'mainpage/tochuc',
                'tin-tuc-su-kien'=>'mainpage/Tintuc',
                'noi-dung/<id:[0-9a-zA-Z_-]+>/<url:[0-9a-zA-Z_-]+>'=>'mainpage/Xemtintuc',
                'trung-tam-to-chuc/<id:[0-9a-zA-Z_-]+>/<url:[0-9a-zA-Z_-]+>'=>'mainpage/Xemtochuc',
                
                'danh-sach-to-chuc'=>'manager/List_trungtam',
                'them-to-chuc' => 'manager/Addtrungtam',
                'xem-to-chuc/<id:[0-9a-zA-Z_-]+>' => 'manager/Updatetrungtam',
                'xoa-to-chuc/<id:[0-9a-zA-Z_-]+>' => 'manager/Deletetrungtam',
                
                'danh-sach-news'=>'manager/Danhsachnews',
                'them-news' => 'manager/Addnews',
                'xem-news/<id:[0-9a-zA-Z_-]+>' => 'manager/Updatenews',
                'xoa-news/<id:[0-9a-zA-Z_-]+>' => 'manager/Deletenews',
                
                'dang-ky' => 'manager/dangky',
                'check-out' => 'payoo/Checkout',
                'page/<url:[0-9a-zA-Z_-]+>' => 'mainpage/Page',
                'thoat-he-thong' => 'home/thoat',
                'ca-nhan' => 'manager/taikhoan',
                'danh-sach-luat-su' => 'manager/List_Parner',
                'thong-tin-luat-su' => 'manager/AddParner',
                'edit-thong-tin-luat-su' => 'manager/UpdateParner',
                'xoa-luat-su/<id:[0-9a-zA-Z_-]+>' => 'manager/DeleteParner',
                'doanh-nghiep/<id:[0-9a-zA-Z_-]+>/<url:[0-9a-zA-Z_-]+>' => 'home/Doanhnghiep',
                'tim-van-ban-phap-luat'=>'mainpage/TimVanbanphapluat',
                'tim-dia-diem' => 'site/timkiem',
                'tim-dia-diem/<id:[0-9a-zA-Z_-]+>' => 'home/timkiem1',
                'thong-bao/<ketqua:[0-9a-zA-Z_-]+>' => 'home/Thongbao',
                'thong-bao-giao-dich/<st:[0-9a-zA-Z_-]+>/<or:[0-9a-zA-Z_-]+>' => 'home/Thongbaogiaodich',
                'danh-muc/<url:[0-9a-zA-Z_-]+>' => 'home/danhmuc',
                
                //manager
                'danh-sach-giao-dich' => 'manager/XemLichsugiaodichadmin',
                'xoa-log-giao-dich/<id:[0-9a-zA-Z_-]+>' => 'manager/Anloggiaodich',
                'lich-su-giao-dich' => 'manager/Lichsugiaodich',
                'mua-quang-cao' => 'manager/Muaquangcao',
                'mua-quang-cao-loai/<k:[0-9a-zA-Z_-]+>' => 'manager/Muaquangcao1',
                'danh-sach-page' => 'manager/List_Page',
                'them-page' => 'manager/AddPage',
                'them-slider' => 'manager/AddSlider',
                'danh-sach-slider' => 'manager/List_slider',
                'Chuong-trinh-game-show' => 'manager/List_game',
                'them-chuong-trinh' => 'manager/AddGame',
                'ca-nhan' => 'manager/taikhoan',
                'thong-tin-ca-nhan' => 'manager/UpdateUser',
                'doi-mat-khau' => 'manager/Changepass',
                'dang-ky' => 'manager/dangky',
                'cai-dat-qua' => 'manager/AddPhanqua',
                'cau-hinh' => 'manager/Cauhinh1',
                'danh-sach-san-pham' => 'manager/List_Product',
                'them-san-pham' => 'manager/AddProduct',
                'xem-san-pham/<id:[0-9a-zA-Z_-]+>' => 'manager/UpdateProduct',
                'xoa-san-pham/<id:[0-9a-zA-Z_-]+>' => 'manager/DeleteProduct',
                'danh-sach-panel' => 'manager/List_Panel',
                'them-panel' => 'manager/AddPanel',
                'xem-panel/<id:[0-9a-zA-Z_-]+>' => 'manager/UpdatePanel',
                'xoa-panel/<id:[0-9a-zA-Z_-]+>' => 'manager/DeletePanel',
                'xem-page/<id:[0-9a-zA-Z_-]+>' => 'manager/UpdatePage',
                'xoa-page/<id:[0-9a-zA-Z_-]+>' => 'manager/DeletePage',
                'danh-sach-doi-tac' => 'manager/List_Doitac',
                'them-doi-tac' => 'manager/AddDoitac',
                'xem-doi-tac/<id:[0-9a-zA-Z_-]+>' => 'manager/UpdateDoitac',
                'xoa-doi-tac/<id:[0-9a-zA-Z_-]+>' => 'manager/DeleteDoitac',
                'danh-sach-giai-tri' => 'manager/List_Giaitri',
                'them-giai-tri' => 'manager/AddGiaitri',
                'xem-giai-tri/<id:[0-9a-zA-Z_-]+>' => 'manager/UpdateGiaitri',
                'xoa-giai-tri/<id:[0-9a-zA-Z_-]+>' => 'manager/DeleteGiaitri',
                'xem-slider/<id:[0-9a-zA-Z_-]+>' => 'manager/UpdateSlider',
                'xoa-slider/<id:[0-9a-zA-Z_-]+>' => 'manager/DeleteSlider',
                'xem-chuong-trinh/<id:[0-9a-zA-Z_-]+>' => 'manager/UpdateProgram',
                'xoa-chuong-trinh/<id:[0-9a-zA-Z_-]+>' => 'manager/DeleteProgam',
                'xem-phanqua/<id:[0-9a-zA-Z_-]+>' => 'manager/UpdatePhanqua',
                'xoa-phanqua/<id:[0-9a-zA-Z_-]+>' => 'manager/XoaPhanqua',
                'so-nguoi-tham-gia' => 'manager/List_People',
                
                'danh-sach-van-ban-luat' => 'manager/Danhsachvanbanluat',
                'them-van-ban-luat' => 'manager/Addvanbanluat',
                'xem-van-ban-luat/<id:[0-9a-zA-Z_-]+>' => 'manager/Updatevanbanluat',
                'xoa-van-ban-luat/<id:[0-9a-zA-Z_-]+>' => 'manager/Deletevanbanluat',
                
                'danh-sach-lien-he-luat-su' => 'manager/List_lienhels',
                'gui-lien-he-luat-su' => 'manager/Addlienhels',
                'xem-yeu-cau-luat-su/<id:[0-9a-zA-Z_-]+>' => 'manager/Updatelienhels',
                'xoa-yeu-cau-luat-su'=>'manager/Deletelienhels',
                
                'danh-sach-lien-he-quang-cao' => 'manager/List_lienheqc',
                'gui-lien-he-quang-cao' => 'manager/Addlienheqc',
                'xem-yeu-cau-quang-cao/<id:[0-9a-zA-Z_-]+>' => 'manager/Updatelienheqc',
                'xoa-yeu-cau-quang-cao'=>'manager/Deletelienheqc',
                //sms
                'kich-hoat-khuyen-mai' => 'sms/sms',
                'kich-hoat-khuyen-mai-local' => 'sms/sms1',
                //gian hang
                'danh-sach-shop' => 'manager/List_Parner',
                'them-shop' => 'manager/AddParner',
                'xem-shop/<id:[0-9a-zA-Z_-]+>' => 'manager/UpdateParnerad',
                'xoa-shop/<id:[0-9a-zA-Z_-]+>' => 'manager/DeleteParner',
                'danh-sach-city' => 'manager/AddCity',
                'xem-city-shop/<id:[0-9a-zA-Z_-]+>' => 'manager/UpdateCity',
                'xoa-city-shop/<id:[0-9a-zA-Z_-]+>' => 'manager/DeleteCity',
                'gian-hang-menu' => 'manager/ListMenu',
                'danh-sach-menu/<id:[0-9a-zA-Z_-]+>' => 'manager/DsMenu',
                'them-menu' => 'manager/AddMenu',
                'xem-menu-shop/<id:[0-9a-zA-Z_-]+>' => 'manager/UpdateMenu',
                'xoa-menu-shop/<id:[0-9a-zA-Z_-]+>' => 'manager/DeleteMenu',
                'gian-hang-danh-muc' => 'manager/ListCategory',
                'danh-sach-danh-muc/<id:[0-9a-zA-Z_-]+>' => 'manager/DsCategory',
                'them-danh-muc' => 'manager/AddCategory',
                'xem-category-shop/<id:[0-9a-zA-Z_-]+>' => 'manager/UpdateCategory',
                'xoa-category-shop/<id:[0-9a-zA-Z_-]+>' => 'manager/DeleteCategory',
                'gian-hang-slider' => 'manager/ListSlider',
                'danh-sach-slider-shop/<id:[0-9a-zA-Z_-]+>' => 'manager/DsSlider',
                'them-slider-shop' => 'manager/AddSliderShop',
                'xem-slider-shop/<id:[0-9a-zA-Z_-]+>' => 'manager/UpdateSliderShop',
                'xoa-slider-shop/<id:[0-9a-zA-Z_-]+>' => 'manager/DeleteSliderShop',
                'gian-hang-page' => 'manager/ListPageshop',
                'danh-sach-page-shop/<id:[0-9a-zA-Z_-]+>' => 'manager/DsPageshop',
                'them-page-shop' => 'manager/AddPageshop',
                'xem-page-shop/<id:[0-9a-zA-Z_-]+>' => 'manager/UpdatePageshop',
                'xoa-page-shop/<id:[0-9a-zA-Z_-]+>' => 'manager/DeletePageshop',
                'gian-hang-product' => 'manager/ListProductshop',
                'danh-sach-product-shop/<id:[0-9a-zA-Z_-]+>' => 'manager/DsProductshop',
                'them-product-shop' => 'manager/AddProductshop',
                'xem-product-shop/<id:[0-9a-zA-Z_-]+>' => 'manager/UpdateProductshop',
                'xoa-product-shop/<id:[0-9a-zA-Z_-]+>' => 'manager/DeleteProductshop',
                'gian-hang-quang-cao' => 'manager/Listpanelshop',
                'danh-sach-banner-shop/<id:[0-9a-zA-Z_-]+>' => 'manager/DsPanelshop',
                'them-baner-shop' => 'manager/AddPanelshop',
                'xem-banner-shop/<id:[0-9a-zA-Z_-]+>' => 'manager/UpdatePanelshop',
                'xoa-banner-shop/<id:[0-9a-zA-Z_-]+>' => 'manager/DeletePanelshop',
                '<controller:\w+>/<id:\d+>' => '<controller>/view',
                '<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',
                '<controller:\w+>/<action:\w+>' => '<controller>/<action>',
            ),
        ),
        'db' => array(
            'connectionString' => 'sqlite:' . dirname(__FILE__) . '/../data/testdrive.db',
        ),
        // uncomment the following to use a MySQL database
        'db' => array(
            //'connectionString' => 'mysql:host=localhost;dbname=luatsu',
             'connectionString' => 'mysql:host=localhost;dbname=lua47b8e_luatsu',
            'emulatePrepare' => true,
            'username' => 'root',
           'password' => '',
           //'username' => 'lua47b8e_luatsu',
           // 'password' => 'Huutinh-fpt200',
 
            'charset' => 'utf8',
        ),
        'cache' => array(
            'class' => 'CDbCache',
        ),
        'errorHandler' => array(
            // use 'site/error' action to display errors
            'errorAction' => 'site/error',
        ),
        'log' => array(
            'class' => 'CLogRouter',
            'routes' => array(
                array(
                    'class' => 'CFileLogRoute',
                    'levels' => 'error, warning',
                ),
            // uncomment the following to show log messages on web pages
            /*
              array(
              'class'=>'CWebLogRoute',
              ),
             */
            ),
        ),
    ),
    // application-level parameters that can be accessed
    // using Yii::app()->params['paramName']
    'params' => array(
        // this is used in contact page
        'adminEmail' => 'webmaster@example.com',
    ),
);
